package network.udptools.Interface;

import java.net.InetAddress;

import exceptions.MessageLengthException;

/**
 * li>Project ChatSystemG6 - INSA 4INFOA1 - * 2013/2014</li>
 * <P>
 * 
 * @author Christelle SIAGO HAPPI < <li>The interface of the userList />
 * 
 *         UDPSenderInterface : The interface of the UDPSender
 */
public interface UDPSenderInterface {

	/**
	 * 
	 * @param messageByte
	 *            : the byte message sent on the network
	 * @param adresse
	 *            : the IP address
	 * @throws MessageLengthException
	 */
	/**
	 * send UDP message in Unicat
	 */
	public void sendUnicastUDPMessage(byte[] messageByte, InetAddress adresse)
			throws MessageLengthException;

	/**
	 * send UDP message in Broadcast
	 * 
	 * @param messageByte
	 *            : the byte message sent on the network
	 * @throws MessageLengthException
	 */
	public void sendBroadcastMessage(byte[] messageByte)
			throws MessageLengthException;

	/**
	 * Stop to send messages
	 */
	public void stopSending();

	/**
	 * 
	 * @return the IP address
	 */
	public InetAddress myIPAdress();

}
